package cn.tedu.ivos.vehicle.mapper;

import cn.tedu.ivos.vehicle.pojo.dto.VehicleQueryDTO;
import cn.tedu.ivos.vehicle.pojo.entity.Vehicle;
import cn.tedu.ivos.vehicle.pojo.vo.VehicleVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface VehicleMapper {
    /**根据条件查询所有车辆信息(没有条件，就查询所有车辆信息)*/
    List<VehicleVO> selectVehicles(VehicleQueryDTO vehicleQuery);

    /**给mysql中插入一个车辆信息*/
    void insertVehicle(Vehicle vehicle);

    /**更新某车辆的信息*/
    void updateVehicle(Vehicle vehicle);

    /**根据车辆id删除某车辆*/
    void deleteVehicle(Long vehicleId);

    /**将车辆的电子围栏id设置为空*/
    void updateNullGeofenceId(Vehicle vehicle);

}
